home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 22
/
Cream of the Crop 22.iso
/
program
/
eflibpt4.zip
/
DEMO
/
STRINGS
/
STRING1.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1996-07-20
|
839b
|
26 lines
{ Borland Pascal Extended Function Library - EFLIB (C) Johan Larsson, 1996
Demonstration; basic string handling #1
EFLIB IS PROTECTED BY THE COPYRIGHT LAW AND MAY NOT BE COPIED, SOLD OR
MANIPULATED. FOR MORE INFORMATION, SEE PROGRAM MANUAL! THIS DEMONSTRAT-
ION PROGRAM MAY FREELY BE USED AND DISTRIBUTED. }
uses EFLIBTXT;
var String1, String2 : string;
begin
String1 := 'To be, or not to be: that is the question.';
String2 := 'question';
{ Write the original string }
WriteLn (String1);
{ Write a string with "question" replaced with "problem" }
WriteLn (StringReplace(String1, String2, 'problem'));
{ Write the position of "be" in string, starting from the end }
WriteLn (StringBackwardPos ('be', String1, Length(String1)));
end.